#include "XWebView.h"
#include <QVBoxLayout>

XWebView::XWebView(QWidget *parent)
    : QWidget(parent)
{
    setWindowTitle(QStringLiteral("有道云&微信"));
    setMinimumSize(1200,800);
    setWindowIcon(QIcon("://logo_max.ico"));
    setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);

    m_webEngineView[0] = new QWebEngineView(this);
    m_webEngineView[0]->load(QUrl("http://note.youdao.com/signIn/index.html?&callback=https://note.youdao.com/web&from=web"));
    m_webEngineView[0]->show();

    m_webEngineView[1] = new QWebEngineView(this);
    m_webEngineView[1]->load(QUrl("https://wx.qq.com/"));
    m_webEngineView[1]->show();

    m_tabWidget = new QTabWidget(this);
    m_tabWidget->addTab(m_webEngineView[0],QStringLiteral("有道云"));
    m_tabWidget->addTab(m_webEngineView[1],QStringLiteral("微信"));

    QVBoxLayout *layout= new QVBoxLayout(this);
    layout->addWidget(m_tabWidget);
    layout->setContentsMargins(0,0,0,0);
    this->setLayout(layout);
}

XWebView::~XWebView()
{

}
